package imp.core.basics.gui;

import javax.swing.JOptionPane;


/**
 * This class displays an error message in an error dialog.
 * @author Patrick Arnold
 * @since 08.09.2010
 *
 */
public class ErrorDialog {
	
	
    /**
     * Constructor which creates a new error message.
     * @param message The message that should be shown (must not be null).
     * @param title The title of the JDialog, null if the default title should be chosen.
     */
    public ErrorDialog( String message, String title) {
    
    	if( message == null) {
    		return;
    	}
    	
    	if( title == null) {
    		title = "Error";
    	}
    	
    	JOptionPane.showMessageDialog( null, message, title, JOptionPane.ERROR_MESSAGE);
    
    }    	

    
}